package com.xinsoft.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xinsoft.entity.dto.MesShiftParam;
import com.xinsoft.entity.po.MesShift;
import com.xinsoft.service.MesShiftService;
import com.xinsoft.mapper.MesShiftMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;

/**
* @author lijie
* @description 针对表【mes_shift(班制)】的数据库操作Service实现
* @createDate 2023-07-17 15:39:55
*/
@Service
public class MesShiftServiceImpl extends ServiceImpl<MesShiftMapper, MesShift>
    implements MesShiftService{

    @Resource
    MesShiftMapper shiftMapper;

    @Override
    public Object findPageListByParam(MesShiftParam param) {
        Page<MesShift> page = new Page<MesShift>(param.getCurrentPage(), param.getPageSize());
        QueryWrapper<MesShift> queryWrapper = new QueryWrapper<>();
        queryWrapper.orderByDesc("update_time");
        IPage<MesShift> resultPage = shiftMapper.selectPage(page, queryWrapper);
        return resultPage;
    }
}




